import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { MainComponent } from './main.component';
// 路由守卫
import { AuthGuard } from '../../../@core/auth/auth.guard';


let rule = [];
const routes: Routes = [
  {
    path:'',
    component: MainComponent,
    canActivate: [AuthGuard],
    children: [
      {
        path: '',
        redirectTo: 'home',
        pathMatch: 'full',
      },
      {path: 'home', loadChildren: '../home/home.module#HomeModule'},
      {path: '**', loadChildren: '../home/home.module#HomeModule'}
    ]
    
  }
];


@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class MainRoutingModule { }
